Skip to content

Conversation

@pcrespov
Copy link
Member

@pcrespov pcrespov commented Feb 6, 2025

What do these changes do?

This PR refactors the Service resource (models and APIs) in the catalog, accessed via REST from the api-server and RPC from the webserver.

  • 🗑️ Retired update_service
    • the catalog's REST update_service entry point (PATCH /service/{*}/{*}), as an alternative is now available in the rpc interface.
    • Dropped ServiceUpdate in favor of ServiceUpdateV2.
    • Retired catalog's client in the webserver that calls to deprecated catalog entries.
  • ♻️ Refactored schema example retrieval by using ModelClass.model_json_schema()["examples"] instead of ModelClass.model_config["json_schema_extra"]["examples"]
  • 🐛 Fixed error messages by adding the missing error_code in the context.
  • 🐛 Fix. api-specs job failed because github.event.after resolves as null
    image
    image

Related issue/s

How to test

cd packages/models-library
make install-dev
make tests
cd services/catalog
make install-dev
make test-dev-unit

Dev-ops

None

@pcrespov pcrespov added a:webserver webserver's codebase. Assigning the area is particularly useful for bugs a:catalog catalog service a:models-library labels Feb 6, 2025
@pcrespov pcrespov self-assigned this Feb 6, 2025
@pcrespov pcrespov added this to the Singularity milestone Feb 6, 2025
@codecov
Copy link

codecov bot commented Feb 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.89%. Comparing base (1853c29) to head (3c15041).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7181      +/-   ##
==========================================
+ Coverage   87.66%   88.89%   +1.23%     
==========================================
  Files        1641     1318     -323     
  Lines       64188    54971    -9217     
  Branches     1179      570     -609     
==========================================
- Hits        56271    48868    -7403     
+ Misses       7606     5974    -1632     
+ Partials      311      129     -182     
Flag Coverage Δ
integrationtests 64.61% <ø> (+0.04%) ⬆️
unittests 86.90% <100.00%> (+0.93%) ⬆️
Components Coverage Δ
api ∅ <ø> (∅)
pkg_aws_library ∅ <ø> (∅)
pkg_dask_task_models_library ∅ <ø> (∅)
pkg_models_library 91.49% <100.00%> (+0.04%) ⬆️
pkg_notifications_library ∅ <ø> (∅)
pkg_postgres_database ∅ <ø> (∅)
pkg_service_integration 70.03% <ø> (ø)
pkg_service_library ∅ <ø> (∅)
pkg_settings_library ∅ <ø> (∅)
pkg_simcore_sdk 85.50% <ø> (ø)
agent 96.46% <ø> (ø)
api_server 90.55% <ø> (ø)
autoscaling 96.08% <ø> (ø)
catalog 91.47% <100.00%> (+1.14%) ⬆️
clusters_keeper 99.24% <ø> (ø)
dask_sidecar 91.26% <ø> (ø)
datcore_adapter 93.19% <ø> (ø)
director 77.10% <ø> (+0.17%) ⬆️
director_v2 91.26% <ø> (-0.05%) ⬇️
dynamic_scheduler 97.17% <ø> (ø)
dynamic_sidecar 89.75% <ø> (ø)
efs_guardian 90.25% <ø> (ø)
invitations 93.28% <ø> (ø)
osparc_gateway_server ∅ <ø> (∅)
payments 92.66% <ø> (ø)
resource_usage_tracker 89.01% <ø> (-0.06%) ⬇️
storage 89.57% <ø> (ø)
webclient ∅ <ø> (∅)
webserver 86.27% <ø> (+0.06%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1853c29...3c15041. Read the comment docs.

@pcrespov pcrespov changed the title ♻️ Is7158/refactor catalog rest WIP: ♻️ Is7158/refactor catalog rest Feb 6, 2025
@pcrespov pcrespov changed the title WIP: ♻️ Is7158/refactor catalog rest WIP: ♻️ Refactors catalog's update_service operation Feb 6, 2025
@pcrespov pcrespov changed the title WIP: ♻️ Refactors catalog's update_service operation ♻️ Refactors catalog's update_service operation Feb 6, 2025
@pcrespov pcrespov marked this pull request as ready for review February 6, 2025 19:18
@pcrespov pcrespov added the t:maintenance Some planned maintenance work label Feb 6, 2025
@pcrespov pcrespov enabled auto-merge (squash) February 6, 2025 19:57
Copy link
Contributor

@bisgaard-itis bisgaard-itis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm
thanks a lot for the effort!

Copy link
Collaborator

@matusdrobuliak66 matusdrobuliak66 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 7, 2025

Copy link
Contributor

@bisgaard-itis bisgaard-itis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for your fix of the ci. Please see my comment.

@pcrespov pcrespov disabled auto-merge February 7, 2025 09:51
@pcrespov pcrespov merged commit 0eca9c2 into ITISFoundation:master Feb 7, 2025
92 of 94 checks passed
@pcrespov pcrespov deleted the is7158/refactor-catalog-rest branch February 7, 2025 09:51
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Mar 6, 2025
63 tasks
mrnicegyu11 pushed a commit to mrnicegyu11/osparc-simcore that referenced this pull request Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a:catalog catalog service a:models-library a:webserver webserver's codebase. Assigning the area is particularly useful for bugs t:maintenance Some planned maintenance work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants